improve/react-main/merging chats of anon and known user#386
improve/react-main/merging chats of anon and known user#386parakhjain23 wants to merge 2 commits intoreact-mainfrom
Conversation
| console.log("ANONYMOUS CASE"); | ||
| // LOGOUT CASE | ||
| if (lastUniqueId) { | ||
| console.log("pehle login tha") | ||
| // last_unique_id exists → user logged in before → get uuid from last login | ||
| const lastLoginClientIdKey = `${widgetId}_${lastUniqueId}_k_clientId`; | ||
| const lastLoginUuid = localStorage.getItem(lastLoginClientIdKey); | ||
| anonClientUuidToSend = lastLoginUuid; | ||
| console.log("anonClientUuidToSend", anonClientUuidToSend); | ||
| } | ||
| } else { | ||
| console.log("LOGIN CASE"); | ||
| // LOGIN CASE (has unique_id) | ||
| if (!lastUniqueId) { | ||
| console.log("pehle logout tha") | ||
| // No last_unique_id → first login → send k/a clientId to merge logout chat | ||
| // No last_unique_id → first login → send logout user's k/a clientId to merge | ||
| const logoutKClientIdKey = `${widgetId}_k_clientId`; | ||
| const logoutAClientIdKey = `${widgetId}_a_clientId`; | ||
| const logoutKClientId = localStorage.getItem(logoutKClientIdKey); | ||
| const logoutAClientId = localStorage.getItem(logoutAClientIdKey); | ||
| anonClientUuidToSend = logoutKClientId || logoutAClientId; | ||
| console.log("anonClientUuidToSend", anonClientUuidToSend); |
There was a problem hiding this comment.
There are multiple console.log statements that should be removed before merging to production:
- Line 105:
console.log("ANONYMOUS CASE") - Line 108:
console.log("pehle login tha") - Line 113:
console.log("anonClientUuidToSend", anonClientUuidToSend) - Line 116:
console.log("LOGIN CASE") - Line 119:
console.log("pehle logout tha") - Line 127:
console.log("anonClientUuidToSend", anonClientUuidToSend) - Line 154-156: Console logs for widgetId and lastUniqueIdKey
| console.log("pehle login tha") | ||
| // last_unique_id exists → user logged in before → get uuid from last login | ||
| const lastLoginClientIdKey = `${widgetId}_${lastUniqueId}_k_clientId`; | ||
| const lastLoginUuid = localStorage.getItem(lastLoginClientIdKey); | ||
| anonClientUuidToSend = lastLoginUuid; | ||
| console.log("anonClientUuidToSend", anonClientUuidToSend); | ||
| } | ||
| } else { | ||
| console.log("LOGIN CASE"); | ||
| // LOGIN CASE (has unique_id) | ||
| if (!lastUniqueId) { | ||
| console.log("pehle logout tha") |
There was a problem hiding this comment.
There are non-English debug messages in the code that should be translated to English for better readability:
- Line 108:
console.log("pehle login tha") - Line 119:
console.log("pehle logout tha")
| // No last_unique_id → first login → send k/a clientId to merge logout chat | ||
| // No last_unique_id → first login → send logout user's k/a clientId to merge |
There was a problem hiding this comment.
There's a duplicate comment on lines 120-121. Please remove one of them:
| // No last_unique_id → first login → send k/a clientId to merge logout chat | |
| // No last_unique_id → first login → send logout user's k/a clientId to merge | |
| // No last_unique_id → first login → send logout user's k/a clientId to merge |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
improve/react-main/merging chats of anon and known user